A computer, and other devices, are known to include a central processing unit, system memory, video graphics circuitry, audio processing circuitry, and peripheral interface ports. In such devices, the central processing unit functions as a host processor while the video graphics circuit (e.g., a graphics co-processor) functions as a loosely coupled co-processor. In general, the host processor executes applications, and during execution, calls upon the co-processor to execute its particular function. For example, if the host processor requires a drawing operation to be performed, it requests via a data element, (such as a command, instruction, pointer to another command, group of commands or instructions, address, and any data associated with the command), the video graphics co-processor to perform the drawing function through a command delivery system.
Processing systems that include at least one host processor, memory, and at least one co-processor are known to use a ring buffer to facilitate the exchange of commands between the host processors and the co-processor(s). The host processor generates multiple data elements (e.g. commands) that relate to a particular application (for example, graphics application, word processing application, drafting application, presentation application, spreadsheet application, video game application, etc.). The host processor writes data elements into a memory queue which is organized in a ring buffer manner to form a ring buffer queue. As the host processor enters the data elements into the ring buffer, it updates a write pointer sequentially which indicates the most current address of the data element written into the ring buffer. The co-processor reads the data elements from the ring buffer and performs a co-processor function in support of the particular application (i.e. executes the commands). As the co-processor reads data elements from the ring buffer, it sequentially updates a read pointer location which indicates the most recently read data element from the ring buffer, or executed data element. The co-processor and host processor exchange the updated write and read pointer locations as they are updated such that both the co-processor and host processor have current records of the read and write pointer locations. The host processor communicates with the co-processors via a handshaking protocol so that the host processor can continuously provide data elements to the ring buffer for consumption by the co-processor.
However, the co-processor, i.e., graphics processor, can suffer from large latencies in retrieving high priority commands, such as certain graphics rendering commands. This is due in part, because each data element in the ring buffer must be executed sequentially before a subsequent data element, such as before a high priority command may be executed. As a result, the execution of data elements requiring the execution of large sequences of rendering commands stored in the ring buffer, for example, must be processed sequentially in the ring buffer without regard to the relative priority between any new data element (e.g. the high priority command). In the event a high priority command is received by the host processor, current processing systems do not typically allow the insertion of a high priority command in the ring buffer queue ahead of any previously submitted but unprocessed data element sequences. As a result, once a high priority command is received by a host processor, the host processor must insert the high priority command at the end of the ring buffer.
Another system proposes the coordination of processing multiple tasks using cooperative multi-tasking between processors. However, with cooperative multi-tasking, the host processor relies on each application to use the co-processor in a manner that is cooperative with the other applications. Each application controls the amount of time that the co-processor provides to each application. However, since each application controls the amount of time the co-processor dedicates to each application, there is a strong tendency for at least one application to monopolize the co-processor. Further, the host or the co-processor has no means to apply a higher priority to any commands from a particular application relative to any previously submitted commands from another application.
Another method to solve the problem of providing co-processor resources to a high priority application is for the host computer to completely or partially reset the operation of the co-processor whenever a higher priority application requests service from the co-processor. This method will restore the co-processor to its initial power-on state. However, this solution suffers from excessive complexity in the resetting and restoring of the co-processor. This method also suffers from the potential corruption of the application and the operating system environment due to the reset of the co-processor. Further, resetting of the co-processor may result in excessive restoration time.
Also, generally, no-operation data fields “NOP” are known for use in instruction fields of computer commands. However, the modification of a command in a ring buffer queue to include a no-operation data field can present a problem. Although a processor may cause a co-processor to skip execution of commands in a ring buffer queue, the execution of these commands is not performed. As a result, the modification of commands in a ring buffer queue may lead to the corruption of the application or operating system because the execution of commands associated with the application or operating system in the ring buffer is skipped.